package com.baor.mall.service.impl;

import java.util.List;
import com.baor.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baor.mall.mapper.TServeMapper;
import com.baor.mall.domain.TServe;
import com.baor.mall.service.ITServeService;

/**
 * 商品服务Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-19
 */
@Service
public class TServeServiceImpl implements ITServeService 
{
    @Autowired
    private TServeMapper tServeMapper;

    /**
     * 查询商品服务
     * 
     * @param commoServeId 商品服务主键
     * @return 商品服务
     */
    @Override
    public TServe selectTServeByCommoServeId(Long commoServeId)
    {
        return tServeMapper.selectTServeByCommoServeId(commoServeId);
    }

    /**
     * 查询商品服务列表
     * 
     * @param tServe 商品服务
     * @return 商品服务
     */
    @Override
    public List<TServe> selectTServeList(TServe tServe)
    {
        return tServeMapper.selectTServeList(tServe);
    }

    /**
     * 新增商品服务
     * 
     * @param tServe 商品服务
     * @return 结果
     */
    @Override
    public int insertTServe(TServe tServe)
    {
        tServe.setCreateTime(DateUtils.getNowDate());
        return tServeMapper.insertTServe(tServe);
    }

    /**
     * 修改商品服务
     * 
     * @param tServe 商品服务
     * @return 结果
     */
    @Override
    public int updateTServe(TServe tServe)
    {
        return tServeMapper.updateTServe(tServe);
    }

    /**
     * 批量删除商品服务
     * 
     * @param commoServeIds 需要删除的商品服务主键
     * @return 结果
     */
    @Override
    public int deleteTServeByCommoServeIds(Long[] commoServeIds)
    {
        return tServeMapper.deleteTServeByCommoServeIds(commoServeIds);
    }

    /**
     * 删除商品服务信息
     * 
     * @param commoServeId 商品服务主键
     * @return 结果
     */
    @Override
    public int deleteTServeByCommoServeId(Long commoServeId)
    {
        return tServeMapper.deleteTServeByCommoServeId(commoServeId);
    }
}
